﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;
using System.Data;

namespace BLL
{
    /// <summary>
    /// 订单
    /// </summary>
   
   public class AppraiseBLL
    {
        //评价添加
        public static bool appraiseAddBLL(Appraise a) {
            return AppraiseDAL.appraiseAdd(a) > 0;
        }
        //评价判重
        public static DataTable appraisePCBLL(int foodid, int userid, string bh) {
            return AppraiseDAL.appraisePC(foodid, userid,bh);
        }
        //前台评价查看
        public static DataTable appraiseCKBLL(int foodid) {
            return AppraiseDAL.appraiseCK(foodid);
        }
        //判断这个美食是否有评价
        public static DataTable sfPJBLL(int foodid) {
            return AppraiseDAL.sfPJ(foodid);
        }
        //查询此商品被评论了多次次
        public static object numBLL(int foodid) {
            return AppraiseDAL.num(foodid);
        }
        //后台评论查看
        public static DataTable backstagePLCKBLL() {
            return AppraiseDAL.backstagePLCK();
        }
        //查询评论条数
        public static object backstageNumBLL() {
            return AppraiseDAL.backstageNum();
        }
        //后台评论查询
        public static DataTable mhcxBLL(string fname, string uname) {
            return AppraiseDAL.mhcx(fname,uname);
        }
        //评论删除
        public static bool plSCBLL(int id) {
            return AppraiseDAL.plSC(id)>0;
        }
        //个人首页评论查看刷新
        public static DataTable backstagePLCKBLL(int id) {
            return AppraiseDAL.backstagePLCK(id);
        }
    }
}
